import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询任务列表
export function selectSysQualityAccessList(query) {
    return request({
        url: '/signal/access/list',
        method: 'get',
        params: query
    })
}

// 查询任务详细
export function selectSysQualityAccessByDataId(dataId) {
    return request({
        url: '/signal/access/getByDataId/' + parseStrEmpty(dataId),
        method: 'get'
    })
}

// 根据数据id集合新增任务
export function insertSysQualityAccessByMetAnalogDataIds(cnIds) {
    return request({
        url: '/signal/access/addByDataIds',
        method: 'post',
        data: cnIds
    })
}

// 新增任务
export function insertSysQualityAccess(data) {
    return request({
        url: '/signal/access',
        method: 'post',
        data: data
    })
}

// 修改任务
export function updateSysQualityAccess(data) {
    return request({
        url: '/signal/access',
        method: 'put',
        data: data
    })
}

// 删除任务
export function deleteSysQualityAccessByIds(cnIds) {
    return request({
        url: '/signal/access/' + cnIds,
        method: 'delete'
    })
}
